<template>
  <div id="app">
    <!-- <div id="nav">
      <router-link to="/hot">
        <span class="iconfont icon-dianyingyuan"></span>
        <p>电影/影院</p>
      </router-link>
      <router-link to="/video">
      <span class="iconfont icon-shipin1"></span>
      <p>视频</p>
      </router-link>
      <router-link to="/shortvideo">
      <span class="iconfont icon-shipin"></span>
      <p>小视频</p>
      </router-link>
      <router-link to="/show">
      <span class="iconfont icon-yanchu"></span>
      <p>演出</p>
      </router-link>
      <router-link to="/login">
      <span class="iconfont icon-my"></span>
      <p>我的</p>
      </router-link>
    </div> -->
    <router-view />
    <myfooter></myfooter>
    <div class="zhiding" v-show="showType" @click="zhiding1">置顶</div>
  </div>
</template>
<script>
import myfooter from "@/components/commonh/myfooter"
// import Myfooter from './components/commonh/myfooter.vue';
export default {
  data(){
    return{
      showType:"false"
    }
  },
  components:{
    myfooter,
    // Myfooter,
  },
  mounted(){
    window.addEventListener("scroll",this.scrollFun,true)
  },
  methods:{
    scrollFun(){
      console.log("滚动");
      let scrollTop = 
      document.documentElement.scrollTop || document.body.scrollTop;
      console.log(scrollTop);
      if(scrollTop>200){
        this.showType = true
      } else {
        this.showType = false
      }
    },
    zhiding1(){
      document.documentElement.scrollTop=document.body.scrollTop=0
    }
  }
};
</script>
<style>
* {
  padding: 0;
  margin: 0;
}
ul,
li {
  list-style: none;
}
a {
  text-decoration: none;
}
.zhiding{
  width: 50px;
  height: 50px;
  background: gray;
  border-radius: 50%;
  position: fixed;
  bottom: 100px;
  right: 20px;
  font-size: 12px;
  color: #fff;
  line-height: 50px;
  text-align: center;
}
/* @import url('//at.alicdn.com/t/font_2636523_2lbu9x4mkom.css');
* {
  padding: 0;
  margin: 0;
}
a{
  text-decoration: none;
}
#nav {
 width: 100%;
 height: 50px;
 position: fixed;
 bottom: 0;
 left: 0;
 border: 1px solid #ccc;
 display: flex;
 justify-content: space-around;
 
 text-align: center;
 background: #fff;
}

#nav a {
 
  font-weight: bold;
  color: #2c3e50;
}

#nav a.router-link-exact-active {
  color: #f03d37;
} */
</style>
